/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bankapplicationgui;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author harshi
 */
public class SignInFrame extends JFrame implements ActionListener{
        
        JPanel panelSignIn;
        JButton buttonDeposit;
        JButton buttonWithdraw;
        JButton buttonBalance;
        JButton buttonPincode;
        float amount;
        
        public SignInFrame(){
            
            super("Bank Operations");
            
            GridLayout grid=new GridLayout(2,2,3,3);
            panelSignIn=new JPanel(grid);
            buttonDeposit=new JButton("Deposit");
            buttonWithdraw=new JButton("Withdraw");
            buttonBalance=new JButton("Balance");
            buttonPincode=new JButton("Change Pincode");
            
            panelSignIn.add(buttonDeposit);
            panelSignIn.add(buttonWithdraw);
            panelSignIn.add(buttonBalance);
            panelSignIn.add(buttonPincode);
            
            add(panelSignIn);
            
            setSize(300,200);
            setVisible(true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            
            buttonDeposit.addActionListener(this);
            buttonWithdraw.addActionListener(this);
            buttonBalance.addActionListener(this);
            buttonPincode.addActionListener(this);
            amount=0;
            
        }
        
        public void actionPerformed(ActionEvent ae){
            String evt=ae.getActionCommand();
            
            if(evt.equals("Deposit")){
                Deposit d1=new Deposit();
                
            }
        }
    }
    
